package com.huaifang.yan.Impl;

import com.huaifang.yan.facade.Consumer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.concurrent.TimeUnit;

/**
 * @author yanhuaifang
 */
@Service("consumer")
public class ConsumerImpl implements Consumer {
    @Value("${server.port}")
    private String port;

    @Override
    public String hello(String name) throws InterruptedException {
        TimeUnit.SECONDS.sleep(1);
        return "hello " + name+ ":" + port;
    }
}
